package org.jeecg.modules.oms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.oms.entity.CfProfileMaterial;
import org.jeecg.modules.oms.mapper.CfProfileMaterialMapper;
import org.jeecg.modules.oms.service.ICfProfileMaterialService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 长风系统型材服务实现类
 */
@Slf4j
@Service
public class CfProfileMaterialServiceImpl extends ServiceImpl<CfProfileMaterialMapper, CfProfileMaterial> implements ICfProfileMaterialService {

    @Override
    public boolean deleteByOrderId(String orderId) {
        LambdaQueryWrapper<CfProfileMaterial> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileMaterial::getOrderId, orderId);
        return this.remove(wrapper);
    }

    @Override
    public List<CfProfileMaterial> getByOrderId(String orderId) {
        LambdaQueryWrapper<CfProfileMaterial> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileMaterial::getOrderId, orderId);
        return this.list(wrapper);
    }
} 